package br.com.single.publico;

import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.springframework.roo.addon.dbre.RooDbManaged;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@Entity
@Table(schema = "publico",name = "cdtabelageneri")
@RooJavaBean
@RooToString
@RooJpaActiveRecord(versionField = "", table = "cdtabelageneri", schema = "publico")
@RooDbManaged(automaticallyDelete = true)
public class Cdtabelageneri {

	
	@Id
    @Column(name = "codigotabela", length = 2,columnDefinition="bpchar")
    private String codigotabela;
	
	
	@OneToMany(mappedBy = "codigotabela")
    private Set<Cditemtabelageneri> cditemtabelageneris;

	@Column(name = "nometabela",columnDefinition="nomegrande")
    @NotNull
    private String nometabela;

	@Column(name = "tipotabela")
    private Character tipotabela;

	public Set<Cditemtabelageneri> getCditemtabelageneris() {
        return cditemtabelageneris;
    }

	public void setCditemtabelageneris(Set<Cditemtabelageneri> cditemtabelageneris) {
        this.cditemtabelageneris = cditemtabelageneris;
    }

	public String getNometabela() {
        return nometabela;
    }

	public void setNometabela(String nometabela) {
        this.nometabela = nometabela;
    }

	public Character getTipotabela() {
        return tipotabela;
    }

	public void setTipotabela(Character tipotabela) {
        this.tipotabela = tipotabela;
    }

	

	public String getCodigotabela() {
        return this.codigotabela;
    }

	public void setCodigotabela(String id) {
        this.codigotabela = id;
    }
}
